package com.dubbo.consumer.controller;

import com.dubbo.consumer.entity.response.Response;
import com.dubbo.consumer.service.IContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Gavin
 * @Date 2023/01/31 11:21
 */
@RestController
@RequestMapping("contract")
public class ContractController {

    private final IContractService contractService;

    @Autowired
    public ContractController(IContractService contractService) {
        this.contractService = contractService;
    }

    @GetMapping("gen")
    public Response genContract() {
        return Response.result(contractService.genContract());
    }
}
